{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table id=\"TableformattingforJupyterNotebook\">\n",
       "    <caption>Table formatting for Jupyter Notebook.</caption>\n",
       "    <thead>\n",
       "        <tr>\n",
       "            <th>int</th>\n",
       "            <th>float</th>\n",
       "            <th>str</th>\n",
       "            <th>bool</th>\n",
       "            <th>mix</th>\n",
       "            <th>time</th>\n",
       "        </tr>\n",
       "    </thead>\n",
       "    <tbody>\n",
       "        <tr>\n",
       "            <td align=\"right\">0</td>\n",
       "            <td align=\"right\">0.10</td>\n",
       "            <td align=\"left\">hoge</td>\n",
       "            <td align=\"left\">True</td>\n",
       "            <td align=\"right\">0</td>\n",
       "            <td align=\"left\">2017-01-01 03:04:05+0900</td>\n",
       "        </tr>\n",
       "        <tr>\n",
       "            <td align=\"right\">2</td>\n",
       "            <td align=\"right\">-2.23</td>\n",
       "            <td align=\"left\">foo</td>\n",
       "            <td align=\"left\">False</td>\n",
       "            <td align=\"left\"></td>\n",
       "            <td align=\"left\">2017-12-23 12:34:51+0900</td>\n",
       "        </tr>\n",
       "        <tr>\n",
       "            <td align=\"right\">3</td>\n",
       "            <td align=\"right\">0.00</td>\n",
       "            <td align=\"left\">bar</td>\n",
       "            <td align=\"left\">True</td>\n",
       "            <td align=\"left\">Infinity</td>\n",
       "            <td align=\"left\">2017-03-03 22:44:55+0900</td>\n",
       "        </tr>\n",
       "        <tr>\n",
       "            <td align=\"right\">-10</td>\n",
       "            <td align=\"right\">-9.90</td>\n",
       "            <td align=\"left\"></td>\n",
       "            <td align=\"left\">False</td>\n",
       "            <td align=\"left\">NaN</td>\n",
       "            <td align=\"left\">2017-01-01 00:00:00+0900</td>\n",
       "        </tr>\n",
       "    </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pytablewriter.writer._markdown.MarkdownTableWriter at 0x7fdfd7783090>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pytablewriter\n",
    "\n",
    "writer = pytablewriter.MarkdownTableWriter()\n",
    "writer.table_name = \"Table formatting for Jupyter Notebook.\"\n",
    "writer.header_list = [\"int\", \"float\", \"str\", \"bool\", \"mix\", \"time\"]\n",
    "writer.value_matrix = [\n",
    "    [0, 0.1, \"hoge\", True, 0, \"2017-01-01 03:04:05+0900\"],\n",
    "    [2, \"-2.23\", \"foo\", False, None, \"2017-12-23 12:34:51+0900\"],\n",
    "    [3, 0, \"bar\", \"true\", \"inf\", \"2017-03-03 22:44:55+0900\"],\n",
    "    [-10, -9.9, \"\", \"FALSE\", \"nan\", \"2017-01-01 00:00:00+0900\"],\n",
    "]\n",
    "\n",
    "# All of the table writer classes in pytablewriter can be formatting in Jupyter Notebook table.\n",
    "writer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
